From: Florian Müllner Date: Sat, 26 Feb 2022 17:10:46 +0000 (+0100) Subject: lookingGlass: Take separate grab for object inspector X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~516^2^2~39 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cff09617f3bd209cd9e7b5b92b979d051e1f9a73;p=gnome-shell.git lookingGlass: Take separate grab for object inspector The object inspector is not a child of the main looking glass dialog, so it no longer receives pointer/touch events with the new grab API. Fix this by pushing/popping a separate grab. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5150 Part-of: --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 96f4d9cd7..30d668f3c 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -451,6 +451,14 @@ class ObjInspector extends St.ScrollView { open(sourceActor) { if (this._open) return; + + const grab = Main.pushModal(this, { actionMode: Shell.ActionMode.LOOKING_GLASS }); + if (grab.get_seat_state() === Clutter.GrabState.NONE) { + Main.popModal(grab); + return; + } + + this._grab = grab; this._previousObj = null; this._open = true; this.show(); @@ -470,6 +478,8 @@ class ObjInspector extends St.ScrollView { close() { if (!this._open) return; + Main.popModal(this._grab); + this._grab = null; this._open = false; this.hide(); this._previousObj = null;